package com.fmx.BookStore.domain;

import com.fmx.BookStore.core.domain.BaseEntity;
import org.springframework.stereotype.Component;

@Component
public class Role extends BaseEntity {
    //角色ID
    private Long roleId;
    //角色名字
    private String roleName;
    //权限ID
    private Long permissionId;
    private Permission permission;


    public Role() {
    }

    public Role(Long roleId, String roleName, Long permissionId, Permission permission) {
        this.roleId = roleId;
        this.roleName = roleName;
        this.permissionId = permissionId;
        this.permission = permission;
    }

    public Permission getPermission() {
        return permission;
    }

    public void setPermission(Permission permission) {
        this.permission = permission;
    }

    public Long getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Long permissionId) {
        this.permissionId = permissionId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    @Override
    public String toString() {
        return "Role{" +
                "roleId=" + roleId +
                ", roleName='" + roleName + '\'' +
                ", permissionId=" + permissionId +
                ", permission=" + permission +
                '}';
    }
}
